(function($) {
	$.fn.giftCardGetBalance = function(opts) {
		$(document).ajaxComplete(function(e, xhr, settings) {
			var urlList = opts.urls;
			var urlMatched = false;
			$.each(urlList, function(i, url){
				if (url == settings.url) {
					urlMatched = true;
					return true;
				}
			})
			if (urlMatched && ($.trim($('.viewGiftCard-getBalance-limit').html()) == "LIMIT")) {
				$(".viewGiftCard-getBalance-limit").parents('.kor-overlay').find('.kor-overlay-close').click();
				location.reload(true);
			}
		});
		return this;
	};
})(jQuery);